package com.example.liyuehui.paging.holder;

import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.example.liyuehui.paging.R;

public class NetworkStateItemViewHolder extends RecyclerView.ViewHolder {


	public ProgressBar progressBar;
	public View retry;
	public TextView errorMsg;

	public NetworkStateItemViewHolder(@NonNull View itemView) {
		super(itemView);
		progressBar = itemView.findViewById(R.id.progress_bar);
		retry = itemView.findViewById(R.id.retry_button);
		errorMsg = itemView.findViewById(R.id.error_msg);
	}


	public void bindTo(NetworkStateItemViewHolder networkState) {
//        progressBar.visibility = toVisibility(networkState?.status == RUNNING)
//        retry.visibility = toVisibility(networkState?.status == FAILED)
//        errorMsg.visibility = toVisibility(networkState?.msg != null)
//        errorMsg.text = networkState?.msg
	}


}
